#ifndef RAYCASTERWIDGET_H
#define RAYCASTERWIDGET_H

#include <QtGui/QWidget>
#include "ui_RaycasterWidget.h"
#include "Raycaster.h"
#include <QResizeEvent>

class RaycasterWidget : public QWidget, Raycaster
{
    Q_OBJECT

public:
    RaycasterWidget(QWidget *parent = 0, Qt::WFlags flags = 0);
    virtual ~RaycasterWidget();

	void SetPixel(unsigned int x, unsigned int y, const Pixel& pixel);
	const Pixel& GetPixel(unsigned int x, unsigned int y) const;
	unsigned int GetHeight() const;
	unsigned int GetWidth() const;

protected:
	void paintEvent(QPaintEvent *e);
	void resizeEvent(QResizeEvent *e);
	QSize sizeHint() const;
	QSize minimumSizeHint() const;
	QSize maximumSizeHint() const;

private:
    Ui::RaycasterWidgetClass ui;
	int fixedWidth, fixedHeight;
};

#endif // RAYCASTERWIDGET_H
